<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="core" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="resources/css/bootstrap.min.css">
<title>所有的书籍</title>
</head>
<body>
<h1>${userName},你好！</h1>
   <a class="btn btn-primary" role="button" href="book/add">添加</a>
   <table class="table table-bordered table-hover">
      <thead>
            <tr><th>书名</th><th>简介</th><th>作者</th><th>操作</th></tr>
      </thead>
      <tbody>
            <core:forEach var="book" items="${books}">
            <tr>
                  <td><a href="book/${book.id}">${book.title}</a></td>
                  <td>${book.brief}</td>
                  <td>${book.author}</td>
                  <td>
                  <a class="btn btn-warning" href="book/delete?id=${book.id}">删除</a>
                  <a class="btn btn-warning" href="book/edit?id=${book.id}">修改</a>
                  </td>
            </tr>
            </core:forEach>
            
      </tbody>
   
   </table>
</body>
</html>